- /* sdmlast.cpp by K.Tsuru */
- // function ID = 311 DARDIX, BRADIX
- /*****************************************************
- SDouble and SDecimal classes
- It detectes the position of the last non-zero figure.
- When cms=CurrentMaxSize()
- p cms L
- 0.aaaa bbbb ... cccc 0000 0000 .... xxxx yyyy
- it returns "p".
- ******************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- uint SDouble::GetLastPosition() const{
- uint cms = CurrentMaxSize();
- if(aHead < cms) return aHead;
- uint fsz = figure.size();
-
- cms--;
- if(cms > fsz) cms = fsz -1u;
- //Maybe there are zeros in the intermediate region.
- while( !figure(cms) && (cms > aTail) ) cms--;
- return figure(aTail) ? cms : 0;
- }
sdmlast.cpp : last modifiled at 2016/09/04 14:21:40(743 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).